forked from netdata/netdata
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pull] master from netdata:master #372
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* remove locks from go.d * remove lock files from pythond
Reviewer's Guide by SourceryThis pull request removes the file locking mechanism, enhances logging for dyncfg operations, updates the k8s_state collector test, and disables the sensors collector by default. Sequence diagram for dyncfgConfigAddsequenceDiagram
participant Manager
participant functions.Function as Function
participant confgroup.Config as Config
Manager->>Manager: m.dyncfgSetConfigMeta(cfg, mn, jn, fn)
Manager->>Manager: m.createCollectorJob(cfg)
alt ecfg exists
Manager->>Manager: m.exposedConfigs.lookup(cfg)
alt scfg exists and isDyncfg
Manager->>Manager: m.seenConfigs.lookup(ecfg.cfg)
Manager->>Manager: m.seenConfigs.remove(ecfg.cfg)
end
end
Manager->>Manager: m.exposedConfigs.add(cfg)
Manager->>Manager: m.seenConfigs.add(cfg)
Manager->>Manager: m.dyncfgRespf(fn, 200, "")
Manager->>Manager: m.dyncfgJobStatus(cfg, dyncfgAccepted)
Sequence diagram for dyncfgConfigRemovesequenceDiagram
participant Manager
participant functions.Function as Function
participant ExposedConfig as Ecfg
Manager->>Manager: m.exposedConfigs.lookupByName(mn, jn)
Manager->>Manager: m.seenConfigs.remove(ecfg.cfg)
Manager->>Manager: m.exposedConfigs.remove(ecfg.cfg)
Manager->>Manager: m.stopRunningJob(ecfg.cfg.FullName())
Manager->>Manager: m.FileStatus.Remove(ecfg.cfg)
Manager->>Manager: m.dyncfgRespf(fn, 200, "")
Manager->>Manager: m.dyncfgJobStatus(ecfg.cfg, dyncfgRemoved)
Sequence diagram for dyncfgConfigUpdatesequenceDiagram
participant Manager
participant functions.Function as Function
participant confgroup.Config as Config
Manager->>Manager: m.dyncfgSetConfigMeta(cfg, mn, jn, fn)
alt ecfg.status == dyncfgRunning && ecfg.cfg.UID() == cfg.UID()
Manager->>Manager: m.dyncfgRespf(fn, 200, "")
Manager->>Manager: m.dyncfgJobStatus(ecfg.cfg, ecfg.status)
else
Manager->>Manager: m.exposedConfigs.lookupByName(mn, jn)
Manager->>Manager: m.stopRunningJob(ecfg.cfg.FullName())
Manager->>Manager: m.exposedConfigs.remove(ecfg.cfg)
Manager->>Manager: m.createCollectorJob(cfg)
alt scfg exists
Manager->>Manager: m.seenConfigs.lookup(cfg)
Manager->>Manager: m.startRunningJob(job)
Manager->>Manager: m.dyncfgRespf(fn, 200, "")
Manager->>Manager: m.dyncfgJobStatus(scfg.cfg, scfg.status)
else
Manager->>Manager: m.dyncfgRespf(fn, 500, "Job update failed: cannot find config.")
Manager->>Manager: m.dyncfgJobStatus(scfg.cfg, scfg.status)
end
end
Updated class diagram for Agent and ManagerclassDiagram
class Agent {
-ServiceDiscoveryConfigDir
-CollectorsConfigWatchPath
-StateFile
-RunModule
-MinUpdateEvery
-ModuleRegistry
-ConfigDefaults
-runningJobs
-modules
+New(Config) *Agent
+Run(context.Context)
}
class Config {
-CollectorsConfigWatchPath
-ServiceDiscoveryConfigDir
-StateFile
-ModuleRegistry
-RunModule
-MinUpdateEvery
}
class Manager {
-Modules
-ConfigDefaults
-FileStatus
-FileStatusStore
-FnReg
-Vnodes
-exposedConfigs
-seenConfigs
-runningJobs
-ctx
-cancel
-Out
+New() *Manager
+Run(context.Context)
+addConfig(confgroup.Config)
+removeConfig(confgroup.Config)
+cleanup()
}
Agent -- Config : uses
Agent -- Manager : uses
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.1)
Can you help keep this open source service alive? 💖 Please sponsor : )
Summary by Sourcery
This pull request refactors the dyncfg job management to remove file locking, adds logging for dyncfg actions, and fixes a bug in the k8s_state collector. It also disables the
sensors
collector by default.Bug Fixes:
condition_available
metric was incorrectly assigned the value ofcondition_progressing
.sensors
collector was not disabled by default.Enhancements:
Chores:
lock_dir
configuration option and related code, as file locking is no longer used.